home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2005 October
/
PCWOCT05.iso
/
Software
/
FromTheMag
/
Syn Text Editor 2.1.0.46
/
synsetup-2.1.0.46.exe
/
{app}
/
scripts
/
txt2pdf.vbs
< prev
next >
Wrap
Text File
|
2003-09-13
|
774b
|
28 lines
' Caption: Converts Text to PDF|
' Hint: Converts active document to PDF|
' Icon: <The Icon from the Menuitem>|
option explicit
' Remove the dot to include this files
'#.include <consts>
'#include <cmnfunc>
const mpdf = "C:\win\lcc\projects\my\mpdf\lcc\mpdf.exe"
sub Main(dummy)
if Documents.Count = 0 then
exit sub
end if
dim txt, pdf, cmd
txt = ActiveDocument.FileName
pdf = ChangeFileExt(txt, ".pdf")
if FileExists(txt) then
cmd = AddQuotesUnless(mpdf) & " -t -m fscrn -p letter -l single " & _
AddQuotesUnless(txt) & " " & AddQuotesUnless(pdf)
' Exec mpdf, "-t -m fscrn -p letter -l single " & _
' AddQuotes(txt) & " " & AddQuotes(pdf), ActiveDocument.FilePath, true
Execute cmd, 1, true
end if
end sub